//
//  TZCell.m
//  tristana
//
//  Created by bug neo on 05/01/2021.
//  Copyright © 2021 李康. All rights reserved.
//

#import "TZCell.h"

@interface TZCell ()
@property (weak, nonatomic) IBOutlet UILabel *lbl_title;
@property (weak, nonatomic) IBOutlet UILabel *lbl_name;
@property (weak, nonatomic) IBOutlet UILabel *lbl_phone;
@property (weak, nonatomic) IBOutlet UILabel *lbl_time;
@property (weak, nonatomic) IBOutlet UILabel *lbl_money;
@property (weak, nonatomic) IBOutlet UIImageView *img_back;

@end

@implementation TZCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self initAllPropertys];
    [self setupUI];
}

- (void)initAllPropertys {
    
}

- (void)setupUI {
    
}

- (void)setType:(NSInteger)type {
    _type = type;
    if (type == 0) {
        self.img_back.image = [UIImage imageNamed:@"re_jt"];
        self.lbl_title.text = @"借款人:";
    }else {
        self.img_back.image = [UIImage imageNamed:@"re_qt"];
        self.lbl_title.text = @"欠款人:";
    }
}

- (void)setDic:(NSDictionary *)dic {
    _dic = dic;
    if (self.type == 0) {
        self.lbl_name.text = [dic valueForKey:@"nameOne"];
        self.lbl_phone.text = [dic valueForKey:@"mobileOne"];
        self.lbl_time.text = [dic valueForKey:@"timeOne"];
    }else {
        self.lbl_name.text = [dic valueForKey:@"nameTwo"];
        self.lbl_phone.text = [dic valueForKey:@"mobileRTwo"];
        self.lbl_time.text = [dic valueForKey:@"timeTwo"];
    }
    self.lbl_money.text = [NSString stringWithFormat:@"%@元",[dic valueForKey:@"money"]];
}

@end
